﻿using System;
using ExFlash.Records;

namespace ExFlash.Tags
{
    public class SoundStreamBlockTag : Tag
    {
        public SoundData StreamSoundData
        {
            get;
            private set;
        }

        public AudioCodingFormat SoundFormat
        {
            get;
            private set;
        }

        public SoundStreamBlockTag(int len, int offset, AudioCodingFormat format)
            : base(TagCodes.SoundStreamBlock, len, offset)
        {
            SoundFormat = format;
        }

        public override void SwfDeserialize(BinaryBitReader reader)
        {
            StreamSoundData = SoundDataFactory.GetSoundData(SoundFormat, TagLength);
            StreamSoundData.SwfDeserialize(reader);
        }

        public override void SwfSerialize(byte[] arr, ref int offset)
        {
            throw new NotImplementedException();
        }
    }
}
